package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"vipshop/api/internal/config"
	"vipshop/vipshoprpc/vipshoprpcclient"
)

type ServiceContext struct {
	Config     config.Config
	VipshopRpc vipshoprpcclient.Vipshoprpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:     c,
		VipshopRpc: vipshoprpcclient.NewVipshoprpc(zrpc.MustNewClient(c.VipshopRpc)),
	}
}
